package cosc617_blackteam;

/**
 * @author Laura
 * Command to set the food preparation strategy
 */
public class CmdSetPrepStrat implements I_Command {
	private PrepStrategy strat;
	private InfoAggregator infoagg;
	
	public CmdSetPrepStrat(InfoAggregator infoagg, PrepStrategy strat){
		this.infoagg = infoagg;
		this.strat = strat;
	}
	@Override
	public Object execute() {
		OrderCollections orders = infoagg.getOrders();
		I_CookingStrategy strategy = strat.getStrategy(orders);
		infoagg.setPrepStrategy(strategy);
		return null;
	}

}
